#define _CRT_SECURE_NO_WARNINGS 1



#include <stdio.h>

void* im_memmove(void* dst, void* src, size_t num)
{
	void* ret = dst;
	if (dst > src)
	{
		while (num)
		{
			--num;
			*((char*)dst + num) = *((char*)src + num);
		}
	}
	else
	{
		while (num)
		{
			*(char*)dst = *(char*)src;
			dst = (char*)dst + 1;
			src = (char*)src + 1;
			num--;
		}
	}
}

int main()
{
	char a[] = { '1','2','3','4','5','6','7','8','9'};
	im_memmove(a+2,a, sizeof(char) * 4);

	return 0;
}